var BC_Oprate = {
	jiesuan: function(param) {
		AlertView.layer.loading("正在结算");
		var p = new Promise(function(resolve, reject) {
			BC_POST.canDo({
				gameId: param.gameId,
				player: param.player,
				action: "settle"
			}).then(function(result) {
				BC.do("checkAndSettle", {
					hashId: param.gameId
				}).then(function(result) {
					if(result.logs.length > 0){
						resolve(result);
					}else{
						reject({code:2,msg:"没有log",data:result});
					}
				}).catch(function(err) {
					reject(err);
				});
			}).catch(function(err) {
				reject({code:1,msg:"不允许执行",data:result});
			});
		});
		return p;
	}
};